<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>构造函数模式</title>
	</head>
	<body>
		
		<script>
			//构造函数模式创建对象
			//小明  18岁  男  有男朋友  男朋友会说话   男朋友说话的内容
			
			function Per(name,age,sex,hold,bfHold,bfSay){
				this.name = name;
				this.age = age;
				this.sex = sex;
				this.hold = hold;
				this.bfHold = bfHold;
				this.bfSay = bfSay;
				console.log(this.name+'今年'+this.age+',性别'+this.sex+'。他有一个'+this.hold+',他的'+this.bfHold+'。他说:'+this.bfSay)
			}
			var person = new Per("小明","18岁","男","有男朋友","男朋友会说话","我是小明的男朋友哈哈");
			
		</script>
	</body>
</html>
